<!-- BEGIN: LAYOUT -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Fashion Admin Panel</title>
<link rel="stylesheet" type="text/css" href="css/style.css"/>
<link rel="stylesheet" type="text/css" href="js/jquery.treeview.css"/>
<link rel="stylesheet" media="screen" type="text/css" href="js/js/colorpicker.css" />
<!--[if IE]>
        <link rel="stylesheet" type="text/css" href="css/ie.css" />
<![endif]-->
<script type="text/javascript" src="{baseUrl}/js/fashion/jquery.js"></script>
<script type="text/javascript" src="{baseUrl}/js/tinymce_b/tiny_mce.js"></script>
<script type="text/javascript" src="{baseUrl}/js/fashion/jquery-ui-1.8.16.custom.min.js"></script>
<script type="text/javascript" src="js/jquery.treeview.js"></script>
<script type="text/javascript" src="js/ajaxfileupload.js"></script>
<script type="text/javascript" src="js/js/colorpicker.js"></script>
<script language="javascript">
	function onCheckAll(_name){
		var check=document.getElementsByName(_name);
		var listId=document.getElementsByName('chk[]');
		if(check[0].checked==true){
			for(var i=0;i<listId.length;i++){
				listId[i].checked=true;
				}
			}
			else{
				for(var i=0;i<listId.length;i++){
					listId[i].checked=false;
			}
		
		}
	}
	function onDelSignle(_id,_controller){
		if(confirm("Bạn có chắc chắn muốn xóa không?")){
			window.location.href="?c="+_controller+"&a=delete&id="+_id; 
		}
	}
	function onDelAll(_controller){
		var listId=document.getElementsByName('chk[]');
		var id="";
		for(var i=0;i<listId.length;i++){
			if(listId[i].checked==true){
				id+=listId[i].value+",";
			}
		}
		if(id.length>0){
			var x=id.substring(0,id.length-1);
			if(confirm("Bạn có chắc chắn muốn xóa không?")){
				window.location.href="?c="+_controller+"&e=delete&id="+x;
			}
		}
		else{
			alert("Bạn chưa chọn bản ghi nào !");
			return false;
		}
	}
	function onDeleteMulti(url){
		var f = document.appForm;
		var listId=document.getElementsByName('chk[]');
		var count=0;
		for(var i=0;i<listId.length;i++){
			if(listId[i].checked==true){
				count++;
			}
		}
		if(count==0){
			alert("Bạn chưa chọn bản ghi nào !");
			return false;
		}
		if(count>0){
			if(confirm("Bạn có chắc chắn muốn xóa không?")){
				f.action = url;
				f.submit();
			}	
		}
	}
    $(document).ready(function(){
       $('.table_lists tr:odd').addClass('even');
	   
	   $("#treeView").treeview({
				collapsed: true,
				animated: "medium",
				control:"#sidetreecontrol",
				persist: "location"
		});
		tinyMCE.init({
		// General options
		cleanup : true,
		mode : "specific_textareas",
		editor_selector : "mceEditor",
		relative_urls : false,
		remove_script_host : false,
		theme : "advanced",
		plugins : "autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist,autosave",
			
		// Theme options
		theme_advanced_buttons1 : "save,|,bold,italic,underline,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
		theme_advanced_toolbar_location : "top",
		theme_advanced_toolbar_align : "left",
		theme_advanced_statusbar_location : "bottom",
		theme_advanced_resizing : true,

		// Example content CSS (should be your site CSS)
		content_css : "css/content.css",

		// Drop lists for link/image/media/template dialogs
		template_external_list_url : "lists/template_list.js",
		external_link_list_url : "lists/link_list.js",
		external_image_list_url : "lists/image_list.js",
		media_external_list_url : "lists/media_list.js",

		// Style formats
		style_formats : [
			{title : 'Bold text', inline : 'b'},
			{title : 'Red text', inline : 'span', styles : {color : '#ff0000'}},
			{title : 'Red header', block : 'h1', styles : {color : '#ff0000'}},
			{title : 'Example 1', inline : 'span', classes : 'example1'},
			{title : 'Example 2', inline : 'span', classes : 'example2'},
			{title : 'Table styles'},
			{title : 'Table row 1', selector : 'tr', classes : 'tablerow1'}
		],

		// Replace values for the template plugin
		template_replace_values : {
			username : "Some User",
			staffid : "991234"
		}
	});
    });
    

</script>

</head>

<body>
<div id="wrapper">
	<div id="ajax-loader">
		<img src="{baseUrl}/img/ajax-loader.gif" alt="ajaxloader" />
	</div>
	<div id="header">
		{header}	
	</div><!--end#header-->
	
	<div id="main-content">
		
		{content}
		<div class="clr"></div>
		
	</div><!--end#main-content-->
	
	<div id="footer">
		{footer}
	</div><!--end#footer-->
</div><!--end#wraaper-->

</body>
</html>

<!-- END: LAYOUT -->
